﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DAL.Migrations
{
    public partial class InitDB : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "MenDian_Model",
                columns: table => new
                {
                    MId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MPhone = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MAddress = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MPhoto = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MZT = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MIsDeleted = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MenDian_Model", x => x.MId);
                });

            migrationBuilder.CreateTable(
                name: "YHJ_Model",
                columns: table => new
                {
                    YId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MId = table.Column<int>(type: "int", nullable: false),
                    YName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    YType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    YMZ = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    YXF = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    YXQ = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    YCTume = table.Column<DateTime>(type: "datetime2", nullable: false),
                    YZT = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    YIsDeleted = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_YHJ_Model", x => x.YId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "MenDian_Model");

            migrationBuilder.DropTable(
                name: "YHJ_Model");
        }
    }
}
